package com.xiaoq.sites.repository.impl;

import java.util.List;

import org.mongodb.morphia.Datastore;
import org.mongodb.morphia.query.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.xiaoq.sites.entity.LegendEntity;
import com.xiaoq.sites.repository.ILegendRepository;

@Repository
public class LegendRepositoryImpl implements ILegendRepository {
	
	@Autowired
	private Datastore dataStore;

	@Override
	public List<LegendEntity> LegendList() {
		Query<LegendEntity> legendQuery = dataStore.find(LegendEntity.class);
		List<LegendEntity> legendList = legendQuery.asList();
		return legendList;
	}
	
	

}
